<template>
  <div class="about">
    <h1>This is an about page</h1>
    <p>count:{{ count }}</p>
    <button @click="show">show</button>
    <button @click="changeCount">changeCount</button>
  </div>
</template>

<script lang="ts">
import { defineComponent } from "vue";
export default defineComponent({
  name: "AboutView",
  setup() {  // 选项式 API
    let count = 0;
    const show = () => {
      alert("hello");
    };
    const changeCount = () => {
      count++;
    };
    return { count, show, changeCount };
  },
});
</script>